Introduction

In this script we are going to map Epithelial subtypes onto the Visium slides.

Libraries

library(Seurat)
library(ggpubr)
library(cowplot)
library(dplyr)
library(ggplot2)
library(stringr)
library(readr)
library(SPOTlight)
library(SPATA2)

Setting parameters

Loading necessary paths and parameters

set.seed(123)
source(here::here("misc/paths.R"))
source(here::here("utils/bin.R"))

"{epithelium}/{plt_dir}" %>%
  glue::glue() %>%
  here::here() %>%
  dir.create(path = ,
             showWarnings = FALSE,
             recursive = TRUE)

"{epithelium}/{robj_dir}" %>%
  glue::glue() %>%
  here::here() %>%
  dir.create(path = ,
             showWarnings = FALSE,
             recursive = TRUE)

Set gene dictionary

"{cd4}/gene_dict.R" %>%
  glue::glue() %>%
  here::here() %>%
  source(file = .)

Load data

We have 8 different datasets that we are going to analyze separately. The spatial data comes from the script 03-clustering/03-clustering_integration.Rmd while the sc data can be found in Ramon’s scRNAseq analysis: /scratch/devel/rmassoni/tonsil_atlas_private/2-DOWNSTREAM_PROCESSING/results/R_objects/processed_seurat_objects/processed_seurat_objects/tonsil_integrated_with_harmony_scrublet_annotated.rds.

sp_obj <- "{clust}/{robj_dir}/integrated_spatial.rds" %>%
  glue::glue() %>%
  here::here() %>%
  readRDS(file = .)

# Load SPOTlight data
spotlight_ls <- "{epithelium}/{robj_dir}/spotlight_ls_epithelium.rds" %>%
  glue::glue() %>% 
  here::here() %>%
  readRDS(file = .)
# Single cell data
# sc_obj <- "{decon}/{robj_dir}/tonsil_integrated_with_harmony_scrublet_annotated.rds" %>%
#   glue::glue() %>%
#   here::here() %>%
#   readRDS(file = .)

Add annotation

sp_obj[["annotation"]] <- dplyr::case_when(
  sp_obj@meta.data$Spatial_snn_res.0.3 == 0 ~ "Inter-follicular zone 1",
  sp_obj@meta.data$Spatial_snn_res.0.3 == 1 ~ "T cell zone",
  sp_obj@meta.data$Spatial_snn_res.0.3 == 2 ~ "GC",
  sp_obj@meta.data$Spatial_snn_res.0.3 == 3 ~ "Epithelial 1",
  sp_obj@meta.data$Spatial_snn_res.0.3 == 4 ~ "GC Proliferating",
  sp_obj@meta.data$Spatial_snn_res.0.3 == 5 ~ "Epithelial 2",
  sp_obj@meta.data$Spatial_snn_res.0.3 == 6 ~ "Inter-follicular zone 2",
  sp_obj@meta.data$Spatial_snn_res.0.3 == 7 ~ "Muscle",
)

Set color dataframe for the cell types

nm_df <- "{epithelium}/{robj_dir}/epithelium_nm_df.rds" %>%
  glue::glue() %>% 
  here::here() %>%
  readRDS(file = .)

Add colors to cell types

library(RColorBrewer)
# Define the number of colors you want
nb.cols <- nrow(nm_df)
mycolors <- colorRampPalette(RColorBrewer::brewer.pal(8, "Set2"))(nb.cols)
# https://sashamaps.net/docs/resources/20-colors/
color <- c('#e6194B', '#3cb44b', '#ffe119', '#4363d8', '#f58231', '#911eb4',
           '#42d4f4', '#f032e6', '#bfef45', '#fabed4', '#469990', '#dcbeff',
           '#9A6324', '#fffac8', '#800000', '#aaffc3', '#808000', '#ffd8b1',
           '#000075', '#a9a9a9', '#ffffff', '#000000', '#b00b69')

col_df <- dplyr::bind_cols(nm_df, color = color[1:nrow(nm_df)])

Analysis

Preprocess data

decon_mtrx <- spotlight_ls[[2]]
decon_mtrx <- decon_mtrx[, colnames(decon_mtrx) != "res_ss"]

# Set as 0 cell types predicted to be under 1 % of the spot
# decon_mtrx[decon_mtrx < 0.03] <- 0

Change column names

new_cn <- data.frame(mod_nm = colnames(decon_mtrx)) %>%
  dplyr::left_join(nm_df, by = "mod_nm") %>%
  # Central.Mem.PASK. fives some trouble because it only changes between + an -
  # negative goes first and distinct solves it automatically
  dplyr::distinct() %>%
  dplyr::pull(plt_nm)

colnames(decon_mtrx) <- new_cn

We are going to add the deconvolution to the Seurat object.

sp_obj@meta.data <- cbind(sp_obj@meta.data, decon_mtrx)

Look at SPOTlight results

Check Topic profiles

nmf_mod_ls <- spotlight_ls[[1]]
nmf_mod <- nmf_mod_ls[[1]]

h <- NMF::coef(nmf_mod)
rownames(h) <- paste("Topic", 1:nrow(h), sep = "_")
topic_profile_plts <- SPOTlight::dot_plot_profiles_fun(
  h = h,
  train_cell_clust = nmf_mod_ls[[2]])

topic_profile_plts[[2]] +
  ggplot2::theme(axis.text.x = ggplot2::element_text(angle = 90), 
                 axis.text = ggplot2::element_text(size = 12))

Look at all cells profiles

topic_profile_plts[[1]] +
  ggplot2::theme(
    axis.text.y = ggplot2::element_blank(),
    axis.text.x = ggplot2::element_blank(),
    axis.title = ggplot2::element_blank())

Look at cells topic profile

basis_spotlight <- data.frame(NMF::basis(spotlight_ls[[1]][[1]]))

train_labs <- spotlight_ls[[1]][[2]]
colnames(basis_spotlight) <- unique(stringr::str_wrap(train_labs, width = 30))

basis_spotlight[basis_spotlight < 0.0000001] <- 0

DT::datatable(basis_spotlight, filter = "top")

Cell type location

Look at the location of each cell type in each slice separately

# Iterate over cell types
ct <- colnames(decon_mtrx)

# Iterate over images
lapply(Seurat::Images(sp_obj), function(nm) {
  print(nm)
  nm_donor <- id_sp_df %>% dplyr::filter(gem_id == nm) %>% dplyr::pull(donor_id)
  # Iterate over cell types
  ct_plt_ls <- lapply(ct, function(i) {
    tmp_plt <- Seurat::SpatialFeaturePlot(
      object = sp_obj,
      features = i,
      alpha = c(0, 1),
      images = nm) +
      ggplot2::scale_fill_gradientn(
        colors = heat.colors(10, rev = TRUE)) +
      ggplot2::scale_alpha(range = c(0, 1)) +
      ggplot2::labs(title = stringr::str_wrap(string = i,
                                     width = 25),
           fill = "") +
      ggplot2::theme(
        plot.title = ggplot2::element_text(
          hjust = 0.5,
          size = 20,
          face = "bold"))
    
    return(tmp_plt)
  })
  
  (plt_arr <- cowplot::plot_grid(
    plotlist = ct_plt_ls,
    axis = "trbl",
    align = "hv",
    ncol = 4))
  
  "{epithelium}/{plt_dir}/cell_type_location_epithelial_{nm_donor}.pdf" %>%
    glue::glue() %>%
    here::here() %>%
    cowplot::save_plot(
      filename = .,
      plot = plt_arr,
      base_height = 25,
      base_width = 25)
  })
## [1] "tarwe1_xott6q"
## [1] "c28w2r_7jne4i"
## [1] "esvq52_nluss5"
## [1] "p7hv1g_tjgmyj"
## [1] "gcyl7c_cec61b"
## [1] "zrt7gl_lhyyar"
## [1] "qvwc8t_2vsr67"
## [1] "exvyh1_66caqq"
## [[1]]
## [1] "/scratch/devel/melosua/phd/projects/BCLLatlas/tonsil_atlas/spatial_transcriptomics/epithelium_integration/2020-09-22/plots_2020-09-22/cell_type_location_epithelial_BCLL-2-T.pdf"
## 
## [[2]]
## [1] "/scratch/devel/melosua/phd/projects/BCLLatlas/tonsil_atlas/spatial_transcriptomics/epithelium_integration/2020-09-22/plots_2020-09-22/cell_type_location_epithelial_BCLL-8-T.pdf"
## 
## [[3]]
## [1] "/scratch/devel/melosua/phd/projects/BCLLatlas/tonsil_atlas/spatial_transcriptomics/epithelium_integration/2020-09-22/plots_2020-09-22/cell_type_location_epithelial_BCLL-10-T.pdf"
## 
## [[4]]
## [1] "/scratch/devel/melosua/phd/projects/BCLLatlas/tonsil_atlas/spatial_transcriptomics/epithelium_integration/2020-09-22/plots_2020-09-22/cell_type_location_epithelial_BCLL-12-T.pdf"
## 
## [[5]]
## [1] "/scratch/devel/melosua/phd/projects/BCLLatlas/tonsil_atlas/spatial_transcriptomics/epithelium_integration/2020-09-22/plots_2020-09-22/cell_type_location_epithelial_BCLL-13-T.pdf"
## 
## [[6]]
## [1] "/scratch/devel/melosua/phd/projects/BCLLatlas/tonsil_atlas/spatial_transcriptomics/epithelium_integration/2020-09-22/plots_2020-09-22/cell_type_location_epithelial_BCLL-14-T.pdf"
## 
## [[7]]
## [1] "/scratch/devel/melosua/phd/projects/BCLLatlas/tonsil_atlas/spatial_transcriptomics/epithelium_integration/2020-09-22/plots_2020-09-22/cell_type_location_epithelial_BCLL-9-T.pdf"
## 
## [[8]]
## [1] "/scratch/devel/melosua/phd/projects/BCLLatlas/tonsil_atlas/spatial_transcriptomics/epithelium_integration/2020-09-22/plots_2020-09-22/cell_type_location_epithelial_BCLL-11-T.pdf"

Boxplots

Make boxplots for each slice

# Iterate over images
lapply(Seurat::Images(sp_obj), function(nm) {
  nm_donor <- id_sp_df %>% dplyr::filter(gem_id == nm) %>% dplyr::pull(donor_id)
  # Prepare data for boxplots
  metadata_long <- sp_obj@meta.data %>% 
    # tidyr::pivot_longer(cols = c("annotation"),
    #                     names_to = "stratification_id",
    #                     values_to = "stratification_val") %>%
    tidyr::pivot_longer(cols = dplyr::all_of(ct),
                        names_to = "ct_key",
                        values_to = "ct_val") %>%
    # dplyr::left_join(col_df, by = c("ct_key" = "ct_name")) %>%
    dplyr::mutate(ct_val = dplyr::if_else(ct_val > 0.001, ct_val, 0)) %>%
    dplyr::filter(gem_id == nm)
  
  # Box plot of cell type proportion between stratified regions showing the unadjusted ANOVA Pvalue
  
  keep_ct <- metadata_long %>%
    dplyr::group_by(ct_key) %>%
    dplyr::summarise(prop_sum = sum(ct_val)) %>% 
    dplyr::filter(prop_sum > 0) %>%
    dplyr::pull(ct_key)
  
  (bplt <- metadata_long %>%
    dplyr::filter(ct_key %in% keep_ct) %>%
    dplyr::mutate(
      ct_key = stringr::str_wrap(string = ct_key,
                                     width = 30)) %>%
    # dplyr::mutate(stratification_val = factor(stratification_val, 
    #                                           levels = c("Fibrotic", "HER2+/ESR1+",
    #                                                      "HER2+/ESR1-", "HER2-/ESR1+",
    #                                                      "HER2-/ESR1-"))) %>%
    # dplyr::filter(! plt_name %in% c("CD8 EM-like", "CD4 naive-like")) %>%
    ggpubr::ggboxplot(data = .,
                      x = "annotation",
                      y = "ct_val",
                      facet.by = "ct_key",
                      color = "annotation",
                      fill = "annotation",
                      add = "jitter",
                      scales = "free",
                      repel = TRUE,
                      outlier.shape = NA,
                      alpha = 0.6,
                      palette = "Set1",
                      ncol = 5) +
    ggplot2::theme(
      strip.text = ggplot2::element_text(size = 18, face = "bold"),
      axis.text.y = ggplot2::element_text(size = 16),
      axis.title.y = ggplot2::element_text(size = 20),
      # axis.text.x = element_text(size = 12, angle = 90, vjust = 0.5, hjust = 0.5),
      axis.text.x = ggplot2::element_blank(),
      legend.text = ggplot2::element_text(size = 18),
      legend.title = ggplot2::element_blank(),
      strip.background = ggplot2::element_blank()) +
    ggplot2::labs(
      y = "Proportion",
      color = "Regions",
      fill = "Regions"))
  # bplt <- bplt +
  #   ggpubr::stat_compare_means(method = "anova", size = 6) +
  #   ggplot2::scale_y_continuous(
  #     expand = expansion(mult = c(0, 0.1)),
  #     labels = function(x) sprintf("%.2f", x))
  
  "{epithelium}/{plt_dir}/strat_bplot_{nm_donor}.pdf" %>%
    glue::glue() %>%
    here::here() %>%
    cowplot::save_plot(
      filename = .,
      plot = bplt,
      base_height = 20,
      base_width = 25)

})
## [[1]]
## [1] "/scratch/devel/melosua/phd/projects/BCLLatlas/tonsil_atlas/spatial_transcriptomics/epithelium_integration/2020-09-22/plots_2020-09-22/strat_bplot_BCLL-2-T.pdf"
## 
## [[2]]
## [1] "/scratch/devel/melosua/phd/projects/BCLLatlas/tonsil_atlas/spatial_transcriptomics/epithelium_integration/2020-09-22/plots_2020-09-22/strat_bplot_BCLL-8-T.pdf"
## 
## [[3]]
## [1] "/scratch/devel/melosua/phd/projects/BCLLatlas/tonsil_atlas/spatial_transcriptomics/epithelium_integration/2020-09-22/plots_2020-09-22/strat_bplot_BCLL-10-T.pdf"
## 
## [[4]]
## [1] "/scratch/devel/melosua/phd/projects/BCLLatlas/tonsil_atlas/spatial_transcriptomics/epithelium_integration/2020-09-22/plots_2020-09-22/strat_bplot_BCLL-12-T.pdf"
## 
## [[5]]
## [1] "/scratch/devel/melosua/phd/projects/BCLLatlas/tonsil_atlas/spatial_transcriptomics/epithelium_integration/2020-09-22/plots_2020-09-22/strat_bplot_BCLL-13-T.pdf"
## 
## [[6]]
## [1] "/scratch/devel/melosua/phd/projects/BCLLatlas/tonsil_atlas/spatial_transcriptomics/epithelium_integration/2020-09-22/plots_2020-09-22/strat_bplot_BCLL-14-T.pdf"
## 
## [[7]]
## [1] "/scratch/devel/melosua/phd/projects/BCLLatlas/tonsil_atlas/spatial_transcriptomics/epithelium_integration/2020-09-22/plots_2020-09-22/strat_bplot_BCLL-9-T.pdf"
## 
## [[8]]
## [1] "/scratch/devel/melosua/phd/projects/BCLLatlas/tonsil_atlas/spatial_transcriptomics/epithelium_integration/2020-09-22/plots_2020-09-22/strat_bplot_BCLL-11-T.pdf"

Integrated UMAP

Seurat::DimPlot(
  object = sp_obj,
  group.by = c("annotation", "sample_id"))

Next we want to look at the piecharts in the UMAP

# Loading libraries
suppressMessages(require(ggplot2))
suppressMessages(require(dplyr))
suppressMessages(require(tibble))
suppressMessages(require(grid))


metadata_ds <- data.frame(sp_obj@meta.data)

colnames(metadata_ds) <- colnames(sp_obj@meta.data)
cell_types_all <- ct
cell_types_interest <- cell_types_all

# If not all cell types are in the cell types of interest we only want to keep those spots which have at least one of the cell types of interest
if (!all(cell_types_all %in% cell_types_interest)) {

  metadata_ds <- metadata_ds %>%
    tibble::rownames_to_column("barcodeID") %>%
    dplyr::mutate(rsum = base::rowSums(.[, cell_types_interest,
                                         drop = FALSE])) %>%
    dplyr::filter(rsum != 0) %>%
    dplyr::select("barcodeID") %>%
    dplyr::left_join(metadata_ds %>% tibble::rownames_to_column("barcodeID"),
                     by = "barcodeID") %>%
    tibble::column_to_rownames("barcodeID")
}

## Preprocess data
umap_coord <- data.frame(sp_obj@reductions$umap@cell.embeddings[, c("UMAP_1", "UMAP_2")]) %>%
  tibble::rownames_to_column("barcodeID") %>%
  dplyr::inner_join(metadata_ds %>% tibble::rownames_to_column("barcodeID"),
                    by = "barcodeID")

## Plot spatial scatterpie plot
(umap_pie_plt <- ggplot2::ggplot() +
    scatterpie::geom_scatterpie(
      data = umap_coord,
      ggplot2::aes(
        x = UMAP_1,
        y = UMAP_2),
      # Fill the pie chart
      cols = cell_types_all,
      pie_scale = 0.15,
      # Remove black outline
      color = NA) +
    ggplot2::scale_fill_manual(
      breaks = col_df$plt_nm,
      values = col_df$color))

"{epithelium}/{plt_dir}/UMAP_piehcart_integrated.pdf" %>%
  glue::glue() %>%
  here::here() %>%
  cowplot::save_plot(
    filename = .,
    plot = umap_pie_plt,
    base_height = 20,
    base_width = 25)

Cell type correlation matrix

We look at the cell-type correlation for all the slices together

# se_sub <- subset(sp_obj, subset = gem_id == "esvq52_nluss5")
# se_sub
# se_sub@images <- se_sub@images[Seurat::Images(se_sub) == "esvq52_nluss5"]

(cor_mtrx_ct <- SCrafty::correlation_heatmap( 
  se = sp_obj,
  feats = ct,
  assay = "Spatial",
  slot = "data") +
   ggplot2::labs(
     title = "Integrated cell-type correlation matrix"))

"{epithelium}/{plt_dir}/magic_cor-mtrx_cell-type_integrated.pdf" %>%
  glue::glue() %>%
  here::here() %>%
  cowplot::save_plot(
    filename = .,
    plot = cor_mtrx_ct,
    base_height = 9,
    base_width = 10)

We look at the cell-type correlation for each slices separately

# Iterate over images
lapply(Seurat::Images(sp_obj), function(nm) {

  se_sub <- subset(sp_obj, subset = gem_id == nm)
  se_sub@images <- se_sub@images[Seurat::Images(se_sub) == nm]
  
  (cor_mtrx_ct <- SCrafty::correlation_heatmap( 
    se = se_sub,
    feats = ct,
    assay = "Spatial",
    slot = "data") +
     ggplot2::labs(
       title = "{nm} - Integrated cell-type correlation matrix"))
  
  "{epithelium}/{plt_dir}/cor-mtrx_cell-type_integrated_{nm}.pdf" %>%
    glue::glue() %>%
    here::here() %>%
    cowplot::save_plot(
      filename = .,
      plot = cor_mtrx_ct,
      base_height = 9,
      base_width = 10)
})
## [[1]]
## [1] "/scratch/devel/melosua/phd/projects/BCLLatlas/tonsil_atlas/spatial_transcriptomics/epithelium_integration/2020-09-22/plots_2020-09-22/cor-mtrx_cell-type_integrated_tarwe1_xott6q.pdf"
## 
## [[2]]
## [1] "/scratch/devel/melosua/phd/projects/BCLLatlas/tonsil_atlas/spatial_transcriptomics/epithelium_integration/2020-09-22/plots_2020-09-22/cor-mtrx_cell-type_integrated_c28w2r_7jne4i.pdf"
## 
## [[3]]
## [1] "/scratch/devel/melosua/phd/projects/BCLLatlas/tonsil_atlas/spatial_transcriptomics/epithelium_integration/2020-09-22/plots_2020-09-22/cor-mtrx_cell-type_integrated_esvq52_nluss5.pdf"
## 
## [[4]]
## [1] "/scratch/devel/melosua/phd/projects/BCLLatlas/tonsil_atlas/spatial_transcriptomics/epithelium_integration/2020-09-22/plots_2020-09-22/cor-mtrx_cell-type_integrated_p7hv1g_tjgmyj.pdf"
## 
## [[5]]
## [1] "/scratch/devel/melosua/phd/projects/BCLLatlas/tonsil_atlas/spatial_transcriptomics/epithelium_integration/2020-09-22/plots_2020-09-22/cor-mtrx_cell-type_integrated_gcyl7c_cec61b.pdf"
## 
## [[6]]
## [1] "/scratch/devel/melosua/phd/projects/BCLLatlas/tonsil_atlas/spatial_transcriptomics/epithelium_integration/2020-09-22/plots_2020-09-22/cor-mtrx_cell-type_integrated_zrt7gl_lhyyar.pdf"
## 
## [[7]]
## [1] "/scratch/devel/melosua/phd/projects/BCLLatlas/tonsil_atlas/spatial_transcriptomics/epithelium_integration/2020-09-22/plots_2020-09-22/cor-mtrx_cell-type_integrated_qvwc8t_2vsr67.pdf"
## 
## [[8]]
## [1] "/scratch/devel/melosua/phd/projects/BCLLatlas/tonsil_atlas/spatial_transcriptomics/epithelium_integration/2020-09-22/plots_2020-09-22/cor-mtrx_cell-type_integrated_exvyh1_66caqq.pdf"

Session Info

sessionInfo()
## R version 4.0.1 (2020-06-06)
## Platform: x86_64-conda_cos6-linux-gnu (64-bit)
## Running under: Red Hat Enterprise Linux Server release 6.7 (Santiago)
## 
## Matrix products: default
## BLAS/LAPACK: /scratch/groups/hheyn/software/anaconda3/envs/spatial_r/lib/libopenblasp-r0.3.12.so
## 
## locale:
##  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=es_ES.UTF-8        LC_COLLATE=en_US.UTF-8     LC_MONETARY=es_ES.UTF-8    LC_MESSAGES=en_US.UTF-8    LC_PAPER=es_ES.UTF-8       LC_NAME=C                  LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=es_ES.UTF-8 LC_IDENTIFICATION=C       
## 
## attached base packages:
## [1] grid      parallel  stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
##  [1] tidyr_1.1.3         tibble_3.1.2        Biobase_2.50.0      BiocGenerics_0.36.0 RColorBrewer_1.1-2  SPATA2_0.1.0        SPOTlight_0.1.7     readr_1.4.0         stringr_1.4.0       dplyr_1.0.7         cowplot_1.1.1       ggpubr_0.4.0        ggplot2_3.3.5       SeuratObject_4.0.2  Seurat_4.0.3       
## 
## loaded via a namespace (and not attached):
##   [1] utf8_1.2.1                  reticulate_1.20             tidyselect_1.1.1            htmlwidgets_1.5.3           Rtsne_0.15                  scatterpie_0.1.6            munsell_0.5.0               codetools_0.2-18            ica_1.0-2                   DT_0.18                     future_1.21.0               miniUI_0.1.1.1              withr_2.4.2                 colorspace_2.0-2            highr_0.9                   knitr_1.35                  rstudioapi_0.13             stats4_4.0.1                SingleCellExperiment_1.12.0 ROCR_1.0-11                 ggsignif_0.6.1              tensor_1.5                  listenv_0.8.0               NMF_0.23.0                  MatrixGenerics_1.2.1        labeling_0.4.2              GenomeInfoDbData_1.2.4      polyclip_1.10-0             farver_2.1.0                rprojroot_2.0.2             parallelly_1.26.0           vctrs_0.3.8                 generics_0.1.0              xfun_0.26                   R6_2.5.0                    doParallel_1.0.16           GenomeInfoDb_1.26.4         bitops_1.0-7                spatstat.utils_2.2-0        DelayedArray_0.16.3         assertthat_0.2.1            promises_1.2.0.1           
##  [43] scales_1.1.1                gtable_0.3.0                globals_0.14.0              goftest_1.2-2               rlang_0.4.11                splines_4.0.1               rstatix_0.7.0               lazyeval_0.2.2              spatstat.geom_2.2-0         broom_0.7.6                 BiocManager_1.30.15         yaml_2.2.1                  reshape2_1.4.4              abind_1.4-5                 crosstalk_1.1.1             backports_1.2.1             httpuv_1.6.1                tools_4.0.1                 gridBase_0.4-7              ellipsis_0.3.2              spatstat.core_2.2-0         jquerylib_0.1.4             ggridges_0.5.3              Rcpp_1.0.6                  plyr_1.8.6                  zlibbioc_1.36.0             purrr_0.3.4                 RCurl_1.98-1.3              ps_1.6.0                    rpart_4.1-15                deldir_0.2-3                pbapply_1.4-3               S4Vectors_0.28.1            zoo_1.8-9                   SummarizedExperiment_1.20.0 haven_2.4.1                 ggrepel_0.9.1               cluster_2.1.0               here_1.0.1                  magrittr_2.0.1              data.table_1.14.0           scattermore_0.7            
##  [85] openxlsx_4.2.3              lmtest_0.9-38               RANN_2.6.1                  fitdistrplus_1.1-3          matrixStats_0.59.0          hms_1.1.0                   patchwork_1.1.1             mime_0.11                   evaluate_0.14               xtable_1.8-4                rio_0.5.26                  readxl_1.3.1                IRanges_2.24.1              gridExtra_2.3               compiler_4.0.1              KernSmooth_2.23-18          crayon_1.4.1                htmltools_0.5.1.1           mgcv_1.8-36                 later_1.2.0                 DBI_1.1.1                   corrplot_0.89               tweenr_1.0.2                MASS_7.3-54                 Matrix_1.3-4                car_3.0-10                  cli_2.5.0                   SCrafty_0.1.0               igraph_1.2.6                GenomicRanges_1.42.0        forcats_0.5.1               pkgconfig_2.0.3             rvcheck_0.1.8               registry_0.5-1              foreign_0.8-81              plotly_4.9.4.1              spatstat.sparse_2.0-0       foreach_1.5.1               ggcorrplot_0.1.3            bslib_0.2.5.1               rngtools_1.5                pkgmaker_0.32.2            
## [127] XVector_0.30.0              digest_0.6.27               sctransform_0.3.2           RcppAnnoy_0.0.18            spatstat.data_2.1-0         rmarkdown_2.11              cellranger_1.1.0            leiden_0.3.8                uwot_0.1.10                 curl_4.3.1                  shiny_1.6.0                 lifecycle_1.0.0             nlme_3.1-150                jsonlite_1.7.2              carData_3.0-4               viridisLite_0.4.0           fansi_0.5.0                 pillar_1.6.1                lattice_0.20-44             fastmap_1.1.0               httr_1.4.2                  survival_3.2-11             glue_1.4.2                  zip_2.2.0                   png_0.1-7                   iterators_1.0.13            ggforce_0.3.3               stringi_1.6.2               sass_0.4.0                  irlba_2.3.3                 future.apply_1.7.0